<div class="users form">
<?php echo $this->Form->create('User');?>
	<fieldset>
 		<legend><?php __('Add User'); ?></legend>
	<?php
			echo $this->Form->input('name', array('label' => __('name', true)));
			echo $this->Form->input('email');
			echo $this->Form->input('email2', array('label' => "Confirme o Email"));
			echo $this->Form->input('password', array('type' => 'password'));
			echo $this->Form->input('password2', array('type' => 'password', 'label' => _("Confirme a Senha")));
			if($this->Session->Read('user.level') == 1){
				echo $this->Form->input(__('tipo', true), array('type' => 'radio', 'options' => array( '0' => 'Aluno', '1' => 'Administrador')));
			}
		?>
	</fieldset>
<?php echo $this->Form->end(__('Submit', true));?>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
	<?php 
	if($this->Session->Read('user.level') == 1):?>
	<li><?php echo $this->Html->link ( __( 'Students', true ), array ('controller' => 'students', 'action' => 'index' ) );?></li>
	<li><?php echo $this->Html->link ( __( 'Companies', true ), array ('controller' => 'companies', 'action' => 'index' ) );?></li>
	<li><?php echo $this->Html->link(__('Users', true), array('action' => 'index'));?></li>
	<?php endif;?>
	<?php 
	//pr($this->Session->Read('user'));
	if($this->Session->Read('user.email') != ''){?>
	<li><?php echo $this->Html->link ( __( 'Logout', true ), array ('action' => 'logout' ) );?></li>
	<?php } else { ?>
	<li><?php echo $this->Html->link ( __( 'Login', true ), array ('action' => 'login' ) );?></li>
	<?php }?>
	</ul>
</div>